|
![](/i/fill.gif) |
Hohum wrote:
> Your wish is my command.
> My less than optimal code in is now p.b.s-f, but it gets the job done.
> Micheal Andrews results seem more flexible than mine, and faster too.
>
> My code could be altered to do 3D checks, I believe it's the same principle
> to check spherical clearance in 3D as it is for disc clearance in 2D.
>
> taking x=difference in x coords of test points, etc
> clearance is half the diameter of each object
> 2D
> if x^2 + y^2 < clearance^2 then you are too close.
> 3D
> if x^2 + y^2 + y^2 < clearance^2 then you are too close, I think.
>
>
Thanks!
Dave Matthews
Post a reply to this message
|
![](/i/fill.gif) |